package book.bookaction;

import book.bookentity.Book;
import book.bookservice.BookService;
import com.nf.Annotation.Autowired;
import util.HttpFactory;
import view.exten.ZhuanfaView;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class BookHandler {
    @Autowired("bookService")
    private BookService bookService;
    public void selectAllBook(){
        List<Book> books = bookService.selectAllBook();
        HttpServletRequest request = HttpFactory.getActionFaction().getRequest();
        request.setAttribute("list",books);
        new ZhuanfaView("display.jsp");
    }
}
